﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class Management_information : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        DBaccess db = new DBaccess();
        String getRid = HttpContext.Current.Request.QueryString["rid"];
        DataSet ds = new DataSet();
        if (getRid == null) getRid = "1";
        ds = db.GetDataSet("select * from mr_v_resource where rid='" + getRid + "'");
        Image1.ImageUrl = ResolveUrl(ds.Tables[0].Rows[0]["logo"].ToString());
        LabelName.Text = "资源名：" + ds.Tables[0].Rows[0]["rname"].ToString();
        LabelCourse.Text = "所属课程：" + ds.Tables[0].Rows[0]["cname"].ToString();
        LabelOwner.Text = "拥有者：" + ds.Tables[0].Rows[0]["mname"].ToString();
        LabelScore.Text = "难度评分：" + ds.Tables[0].Rows[0]["score"].ToString();

        LabelUptime.Text = "上传时间：" + ((DateTime)ds.Tables[0].Rows[0]["upload_time"]).ToLongDateString();
        LabIntro.Text = "简介：" + ds.Tables[0].Rows[0]["introduction"].ToString();
        LabKeyword.Text = "关键词：" + ds.Tables[0].Rows[0]["keyword"].ToString();

    }

    protected void Button2_Click(object sender, EventArgs e)
    {
        Session["search"] = TextBox7.Text;
        Response.Redirect("./test.aspx");
    }
}